package bairui.international.model.domain.jpa;

/**
 *
 * @see TB_ProductCategoryProperty 产品分类属性
 *
 */
public class TestData_TB_ProductCategoryProperty
{

	private final static org.apache.commons.text.RandomStringGenerator Generator = new org.apache.commons.text.RandomStringGenerator.Builder().withinRange(new char[][]{{'a','z'}, {'A','Z'}, {'0','9'}}).build();

	@SuppressWarnings({ "unchecked", "rawtypes" })
	@org.springframework.transaction.annotation.Transactional(rollbackFor=java.lang.Throwable.class)
	public static TB_ProductCategoryProperty saveMust(
		org.springframework.context.ApplicationContext context,
		bairui.international.model.domain.jpa.id.ID_ProductCategoryProperty id
	){
		org.springframework.data.jpa.repository.JpaRepository repository = (org.springframework.data.jpa.repository.JpaRepository)context.getBean("repository_ProductCategoryProperty");
		return (TB_ProductCategoryProperty)repository.save(newMust(
				id
			));
	}
	
	public static TB_ProductCategoryProperty newMust(
		bairui.international.model.domain.jpa.id.ID_ProductCategoryProperty id
	){
		return new TB_ProductCategoryProperty(new TB_ProductCategoryProperty.MustProperties() {
			@Override public bairui.international.model.domain.jpa.id.ID_ProductCategoryProperty getId(){
				return id;
			}
		});
	}
	

	@SuppressWarnings({ "unchecked", "rawtypes" })
	@org.springframework.transaction.annotation.Transactional(rollbackFor=java.lang.Throwable.class)
	public static TB_ProductCategoryProperty saveAll(
		org.springframework.context.ApplicationContext context,
		bairui.international.model.domain.jpa.id.ID_ProductCategoryProperty id
	){
		org.springframework.data.jpa.repository.JpaRepository repository = (org.springframework.data.jpa.repository.JpaRepository)context.getBean("repository_ProductCategoryProperty");
		return (TB_ProductCategoryProperty)repository.save(newAll(
				id
			));
	}
	
	public static TB_ProductCategoryProperty newAll(
		bairui.international.model.domain.jpa.id.ID_ProductCategoryProperty id
	){
		return new TB_ProductCategoryProperty(
			new TB_ProductCategoryProperty.MustProperties() {
				@Override public bairui.international.model.domain.jpa.id.ID_ProductCategoryProperty getId(){
					return id;
				}
			},
			new TB_ProductCategoryProperty.OptionalSingleProperties() {
			}
		);
	}
	

}
